package org.example.questionnairebackend.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.questionnairebackend.Data.Users;
import org.example.questionnairebackend.Dto.LoginDto;

@Mapper
public interface UsersMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Users record);

    int insertSelective(Users record);

    Users selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Users record);

    int updateByPrimaryKey(Users record);

    @Select("select * from users where username = #{loginname} and password = #{password}")
    Users login(LoginDto dto);
}
